import { axios } from '@/utils/request'

export function selectCompany() {
    return axios({
        url: 'estate/selectCompany',
        method: 'get'
    })
}

export function insertEstate(data) {
    return axios({
        url: 'estate/insertEstate',
        method: 'post',
        data: data
    })
}

export function selectBuilding(parameter) {
    return axios({
        url: 'estate/selectBuilding',
        method: 'post',
        data: parameter
    })
}

export function updateBuilding(params) {
    return axios({
        url: 'estate/updateBuilding',
        method: 'post',
        data: params
    })
}

export function selectUnit(params) {
    return axios({
        url: 'estate/selectUnit',
        method: 'post',
        data: params,
        headers:{
            "Content-Type": "application/json"
        }
    })
}

export function updateUnit(params) {
    return axios({
        url: 'estate/updateUnit',
        method: 'post',
        data: params
    })
}

export function insertCell(params) {
    return axios({
        url: 'estate/insertCell',
        method: 'post',
        data: params,
        headers:{
            "Content-Type": "application/json"
        }
    })
}

export function selectBuildingByEstate(params) {
    return axios({
        url: 'estate/selectBuildingByEstate',
        method: 'post',
        data: params
    })
}

export function selectUnitByBuildingCode(params) {
    return axios({
        url: 'estate/selectUnitByBuildingCode',
        method: 'post',
        data: params
    })
}

export function selectCellByUnitCode(params) {
    return axios({
        url: 'estate/selectCellByUnitCode',
        method: 'post',
        data: params
    })
}

export function selectEstate(params) {
    return axios({
        url: 'estate/selectEstate',
        method: 'post',
        data: params
    })
}
